<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.0.2">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.14.0/css/all.min.css">
  <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/animate.css@3.1.1/animate.min.css">

<script class="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"wanglong_kevin.gitee.io","root":"/","scheme":"Gemini","version":"8.0.0-rc.5","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":false,"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false};
  </script>

  <meta name="description" content="写在最前面：我的个人PC以及工作机OS都是ubuntu, 日常使用的语言为linux c、 python、 shell，使用的编辑器为vim。一直以来都没有找到一个很好的方式来维护一个自己的博客，或者说是记一些随笔。其中很大的原因是 我对shell和vim的高度依赖，不愿在vim以外的编辑器上写字，花费过多的时间在排版上；其次就是可能觉得那些博客网站不够个性化。md是一种极其方便的标记语言,我认">
<meta property="og:type" content="article">
<meta property="og:title" content="markdown 基本语法记录">
<meta property="og:url" content="https://wanglong_kevin.gitee.io/2018/12/01/markdown/index.html">
<meta property="og:site_name" content="冬天里的小木屋">
<meta property="og:description" content="写在最前面：我的个人PC以及工作机OS都是ubuntu, 日常使用的语言为linux c、 python、 shell，使用的编辑器为vim。一直以来都没有找到一个很好的方式来维护一个自己的博客，或者说是记一些随笔。其中很大的原因是 我对shell和vim的高度依赖，不愿在vim以外的编辑器上写字，花费过多的时间在排版上；其次就是可能觉得那些博客网站不够个性化。md是一种极其方便的标记语言,我认">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://wanglong_kevin.gitee.io/images/avatar.jpg">
<meta property="article:published_time" content="2018-11-30T16:00:00.000Z">
<meta property="article:modified_time" content="2018-11-30T16:00:00.000Z">
<meta property="article:author" content="Kevin">
<meta property="article:tag" content="markdown">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://wanglong_kevin.gitee.io/images/avatar.jpg">


<link rel="canonical" href="https://wanglong_kevin.gitee.io/2018/12/01/markdown/">


<script class="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>markdown 基本语法记录 | 冬天里的小木屋</title>
  






  <noscript>
  <style>
  body { margin-top: 2rem; }

  .use-motion .menu-item,
  .use-motion .sidebar,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header {
    visibility: visible;
  }

  .use-motion .header,
  .use-motion .site-brand-container .toggle,
  .use-motion .footer { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle,
  .use-motion .custom-logo-image {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line {
    transform: scaleX(1);
  }

  .search-pop-overlay, .sidebar-nav { display: none; }
  .sidebar-panel { display: block; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <h1 class="site-title">冬天里的小木屋</h1>
      <i class="logo-line"></i>
    </a>
      <p class="site-subtitle" itemprop="description">The Winter Room</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
  </ul>
</nav>




</div>
        
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <section class="post-toc-wrap sidebar-panel">
          <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#1%E3%80%81%E8%AE%BE%E7%BD%AE%E6%A0%87%E9%A2%98"><span class="nav-number">1.</span> <span class="nav-text">1、设置标题</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2%E3%80%81%E6%8D%A2%E8%A1%8C"><span class="nav-number">2.</span> <span class="nav-text">2、换行</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3%E3%80%81%E7%B2%97%E4%BD%93-%E6%96%9C%E4%BD%93"><span class="nav-number">3.</span> <span class="nav-text">3、粗体 斜体</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#4%E3%80%81%E4%BB%A3%E7%A0%81%E5%9D%97"><span class="nav-number">4.</span> <span class="nav-text">4、代码块</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#5%E3%80%81%E9%93%BE%E6%8E%A5"><span class="nav-number">5.</span> <span class="nav-text">5、链接</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#6%E3%80%81%E5%9B%BE%E7%89%87"><span class="nav-number">6.</span> <span class="nav-text">6、图片</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#7%E3%80%81%E5%88%A0%E9%99%A4%E7%BA%BF"><span class="nav-number">7.</span> <span class="nav-text">7、删除线</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#8%E3%80%81-%E8%A1%A8%E6%A0%BC"><span class="nav-number">8.</span> <span class="nav-text">8、 表格</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#9%E3%80%81%E5%BC%95%E7%94%A8"><span class="nav-number">9.</span> <span class="nav-text">9、引用</span></a></li></ol></div>
      </section>
      <!--/noindex-->

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-author animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="Kevin"
      src="/images/avatar.jpg">
  <p class="site-author-name" itemprop="name">Kevin</p>
  <div class="site-description" itemprop="description">NOT a coder, but an artist.</div>
</div>
<div class="site-state-wrap animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">8</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">3</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">11</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



      </section>
    </div>
  </aside>
  <div class="sidebar-dimmer"></div>


    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


    <div class="main-inner post posts-expand">
      

      

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://wanglong_kevin.gitee.io/2018/12/01/markdown/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.jpg">
      <meta itemprop="name" content="Kevin">
      <meta itemprop="description" content="NOT a coder, but an artist.">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="冬天里的小木屋">
    </span>

    
    
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          markdown 基本语法记录
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2018-12-01 00:00:00" itemprop="dateCreated datePublished" datetime="2018-12-01T00:00:00+08:00">2018-12-01</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E8%AF%AD%E6%B3%95%E8%AE%B0%E5%BD%95/" itemprop="url" rel="index"><span itemprop="name">语法记录</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        <blockquote>
<p><em>写在最前面：<br>我的个人PC以及工作机OS都是ubuntu, 日常使用的语言为linux c、 python、 shell，使用的编辑器为vim。<br>一直以来都没有找到一个很好的方式来维护一个自己的博客，或者说是记一些随笔。其中很大的原因是
我对shell和vim的高度依赖，不愿在vim以外的编辑器上写字，花费过多的时间在排版上；其次就是可能觉得那些博客网站不够个性化。<br>md是一种极其方便的标记语言,我认为它是目前最适合的技术文档交流的格式，它可以像代码一样追踪到每一个字符的变化记录，
这个是用word等做不到的。而且几乎所有git server对它有个很好的支持，对于一名技术人员来说，无疑是写文档的首选。<br>hexo + gitee的pages 提供了方便的博客功能，这样就能像管理代码一样来管理博客。<br>对于我个人来说，这种模式是非常舒服的、友好的，非常契合我的开发环境以及开发习惯。</em></p>
</blockquote>
<a id="more"></a>
<blockquote>
<p><a target="_blank" rel="noopener" href="https://markdown-zh.readthedocs.io/en/latest">官方文档</a></p>
</blockquote>
<h2 id="1、设置标题"><a href="#1、设置标题" class="headerlink" title="1、设置标题"></a>1、设置标题</h2><p>第一种：在文字开头加上“#”，通过# 数量表示几级标题。一共有1–6级，1级表示最大。<br>第二种：在文字下面一行写“=” 或者”_“,表示一级二级标题。不常用。  </p>
<h2 id="2、换行"><a href="#2、换行" class="headerlink" title="2、换行"></a>2、换行</h2><p>两个及以上空格加回车 </p>
<h2 id="3、粗体-斜体"><a href="#3、粗体-斜体" class="headerlink" title="3、粗体 斜体"></a>3、粗体 斜体</h2><p>将需要设置为斜体的文字两端用2个”*“或者”_“夹起来<br><strong>这是粗体</strong><br>将需要设置为斜体的文字两端使用1个”*“或者”_“夹起来<br><strong>这是斜体</strong><br>连续三个* 或者 _ 表示加粗斜体<br>**<em>加粗并且斜体**</em>  </p>
<h2 id="4、代码块"><a href="#4、代码块" class="headerlink" title="4、代码块"></a>4、代码块</h2><p>前后各用1个”`“ 夹起来 表示代码行<br><code>例如这样：hello word</code><br>或者3个”`“表示块   </p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">This is a shell</span><br></pre></td></tr></table></figure>
<h2 id="5、链接"><a href="#5、链接" class="headerlink" title="5、链接"></a>5、链接</h2><p><em>这是我的blog<a href="https://wanglong_kevin.gitee.io/">主页</a></em><br><code>这是我的blog[主页](https://wanglong_kevin.gitee.io)</code><br>引用的方式在hexo 中试过行不通   </p>
<h2 id="6、图片"><a href="#6、图片" class="headerlink" title="6、图片"></a>6、图片</h2><p>同链接方式类似 文字部分可有可无<br><img src="/images/avatar.jpg">
<code>![](/images/avatar.jpg)</code></p>
<h2 id="7、删除线"><a href="#7、删除线" class="headerlink" title="7、删除线"></a>7、删除线</h2><p><del>这行不要了</del><br><code>~~这行不要了~~</code><br> 其他性质类似加粗和倾斜，并且可以嵌套。</p>
<h2 id="8、-表格"><a href="#8、-表格" class="headerlink" title="8、 表格"></a>8、 表格</h2><table>
<thead>
<tr>
<th>First</th>
<th>Second</th>
<th>Third</th>
</tr>
</thead>
<tbody><tr>
<td>Longgggggggggg</td>
<td>Short</td>
<td>Longggggggggggggg</td>
</tr>
</tbody></table>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">| First | Second | Third |  </span><br><span class="line">|-------|--------|-------|</span><br><span class="line">|Longgggggggggg|Short|Longggggggggggggg|</span><br></pre></td></tr></table></figure>
<ul>
<li>默认标题栏居中对齐，内容居左对齐。</li>
<li>:- 居左对齐，:-: 居中对齐，-:居右对齐。     </li>
</ul>
<table>
<thead>
<tr>
<th align="left">First</th>
<th align="center">Second</th>
<th align="right">Third</th>
</tr>
</thead>
<tbody><tr>
<td align="left">Longgggggggggg</td>
<td align="center">Short</td>
<td align="right">Longggggggggggggg</td>
</tr>
<tr>
<td align="left">short</td>
<td align="center">longgggggggggggggg</td>
<td align="right">short</td>
</tr>
</tbody></table>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">| First | Second | Third |    </span><br><span class="line">|:-------|:--------:|-------:|  </span><br><span class="line">|Longgggggggggg|Short|Longggggggggggggg|  </span><br><span class="line">|short|longgggggggggggggg|short|   </span><br></pre></td></tr></table></figure>
<h2 id="9、引用"><a href="#9、引用" class="headerlink" title="9、引用"></a>9、引用</h2><p>在引用的文字前加&gt;即可。引用也可以嵌套，如加两个&gt;&gt;三个&gt;&gt;&gt;  </p>
<blockquote>
<p>引用1</p>
<blockquote>
<p>引用2</p>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<p>引用3   </p>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">&gt;引用1</span><br><span class="line">&gt;&gt;引用2</span><br><span class="line">&gt;&gt;&gt;&gt;&gt;&gt;引用3</span><br></pre></td></tr></table></figure>


    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/markdown/" rel="tag"># markdown</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
            </div>
            <div class="post-nav-item">
                <a href="/2018/12/08/mongo-architecture/" rel="next" title="mongo 分布式集群架构设计">
                  mongo 分布式集群架构设计 <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
      </footer>
    
  </article>
  
  
  



      

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      const activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      const commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

    </div>
  </main>

  <footer class="footer">
    <div class="footer-inner">
      

      

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Kevin</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动
  </div>

      








    </div>
  </footer>

  
  <script src="//cdn.jsdelivr.net/npm/animejs@3.2.0/lib/anime.min.js"></script>
<script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/next-boot.js"></script>

  















  

  

</body>
</html>
